import java.util.ArrayList;
import java.util.List;

import javafx.util.Pair//Pair 并非是 Java 标准库自带的类，不过在 Java 里有几种方式能够实现类似 Pair 的功能，也就是把两个对象组合成一个单元。下面详细介绍不同的实现途径。
//二叉树最大宽度
//https://leetcode.cn/problems/maximum-width-of-binary-tree/description/
public class Test {
    public static void main(String[] args) {
        //
    }
}


//Definition for a binary tree node.
class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode() {}
    TreeNode(int val) { this.val = val; }
    TreeNode(int val, TreeNode left, TreeNode right) {
        this.val = val;
        this.left = left;
        this.right = right;
    }
}

//这段类的代码是用豆包生成的
class Pair<K, V> {
    private final K key;
    private final V value;

    public Pair(K key, V value) {
        this.key = key;
        this.value = value;
    }

    public K getKey() {
        return key;
    }

    public V getValue() {
        return value;
    }

    @Override
    public String toString() {
        return "Pair{" +
                "key=" + key +
                ", value=" + value +
                '}';
    }
}



